package com.jc.subject.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author gongjiawei
 * @Date 2024/6/14 15:03
 * @注释
 */
@Getter
@AllArgsConstructor
public enum SubjectTypeFlagEnum {
    //题目类型 1单选 2多选 3判断 4简答
    RADIO(1,"单选题"),
    MULTIPLE(2,"多选题"),
    JUDGE(3,"判断题"),
    BRIEF(4,"简答题");
    private final Integer code;
    private final String desc;

   public static SubjectTypeFlagEnum getByCode(int codeValue){
       for (SubjectTypeFlagEnum value : SubjectTypeFlagEnum.values()) {
           if (value.code==codeValue)
               return value;

       }
       return null;
    }
}
